{yun:}include file="$wapstyle/member/cheader.htm"{/yun} 
<section class="wap_member">
	<div class="wap_member_comp_h1" style="position:relative"><span>职位管理</span></div>
	
	{yun:}if !empty($rows){/yun}
		<div class="wap_member_job_show">
			{yun:}foreach item=v from=$rows{/yun}
				<div class="wap_member_msg ">
					<div class="wap_member_date">
						
						<span class="yun_m_job_date_n">&nbsp;
							<a href="{yun:}url m=wap c=job a=view id=$v.id{/yun}" class="job_list_jobname com_member_hr_cblue">{yun:}$v.name{/yun}</a>
						</span>

						<div class="wap_member_date_r">
							{yun:}if $v.edate < time(){/yun}
								<span class="wap_member_ygq">已过期<span>
							{yun:}elseif $v.state==1{/yun}
								已审核
							{yun:}elseif $v.state==3{/yun}
								<span class="wap_member_wtg" onclick="layermsg('{yun:}$v.statusbody{/yun}');return false;">未通过</span>
							{yun:}elseif $v.state==0{/yun}
								<em>未审核</em>
							{yun:}/if{/yun}
						</div>

					</div>

					<div class="yun_m_job_list_zt">
						应聘简历：{yun:}$v.snum{/yun}  
						<span class="wap_member_msg_job_s">浏览量：{yun:}$v.jobhits{/yun} </span>
					</div>

					<div class="yun_m_job_list_zt">更新时间：{yun:}$v.lastupdate|date_format:"%Y-%m-%d"{/yun}</div>

					{yun:}if $v.state==1{/yun}
						<div class="yun_m_job_list_tg">
							<a href="javascript:void(0)" onclick="showserver('{yun:}$v.id{/yun}')">我要推广</a>
						</div>
					{yun:}/if{/yun}

					<div class="yun_m_job_list_zt">
						{yun:}if $v.xsdate>time(){/yun}
							<span class="yun_m_job_list_fw">已置顶</span>
						{yun:}/if{/yun}
						
						{yun:}if $v.rec_time>time() && $v.rec==1{/yun}
							<span class="yun_m_job_list_fw">已推荐</span>
						{yun:}/if{/yun}
						
						{yun:}if $v.urgent_time>time() && $v.urgent==1{/yun}
							<span class="yun_m_job_list_fw">已紧急</span>
						{yun:}/if{/yun}
						
						{yun:}if $v.autotime>time(){/yun}
							<span class="yun_m_job_list_fw">自动刷新</span>
						{yun:}/if{/yun}
						
						{yun:}if $v.rewardpack==1{/yun}
							<span class="yun_m_job_list_fw">悬赏</span>
						{yun:}/if{/yun}
					</div>

					<div class="yun_member_bth">

						<a href="javascript:layer_del('确定要删除？','index.php?c=jobdel&id={yun:}$v.id{/yun}');"class="yun_member_sub  yun_member_bth1">删除</a>

						{yun:}if $v.state==1{/yun}
							<a href="javascript:void(0)" class="yun_member_sub  yun_member_bth1" onclick="refreshJobWap('{yun:}$v.id{/yun}')">刷新</a> 
						{yun:}/if{/yun}

						<a href="index.php?c=jobadd&id={yun:}$v.id{/yun}" class="yun_member_sub yun_member_bth2">修改</a>
						
						{yun:}if $v.status==1{/yun}
							<a href="javascript:void(0)" onclick="layer_del('','index.php?c=jobset&status=2&id={yun:}$v.id{/yun}')"class="yun_member_sub yun_member_bth3" >
								<span class="yun_member_yzt">已下架</span>上架招聘
							</a>
						{yun:}else{/yun}
							<a href="javascript:void(0)" onclick="layer_del('','index.php?c=jobset&status=1&id={yun:}$v.id{/yun}')"class="yun_member_sub yun_member_bth3">下架</a>
						{yun:}/if{/yun}

					</div>
				
				</div>

			{yun:}/foreach{/yun}

			<div class="pages" style="margin-top:10px;"> {yun:}$pagenav{/yun}</div>
		</div>

	{yun:}else{/yun}
		<div class="wap_member_no">您还没有发布职位。</div>
		
	{yun:}/if{/yun}
		<em class="wap_memberjob_fabu ">
			<a href="javascript:void(0)" onclick="jobadd_url('{yun:}$statis.addjobnum{/yun}','{yun:}$config.integral_job{/yun}','job','{yun:}$statis.integral{/yun}');" style="width:100%;height:43px; line-height:43px; font-size:16px; margin-top:10px; background:#F90;color:#fff; display:inline-block; text-align:center">发布职位</a>
		</em>

	<!--没有职位提示-->
</section>

<!--推广弹出框-->
<div style="width:100%;height:100%; background:rgba(51,51,51,0.5); position:fixed;left:0px;top:0px;z-index:1000000;display:none" id="jobserver">
	<div style="width:100%; position:absolute;left:0px;top:40px;">
		<div style=" padding:20px;">  
			<div class="job_extension_tck" style="display:block">
				
				<div class="job_extension_tck_tit">职位推广<span onclick="$('#jobserver').hide();" style="float:right">关闭</span></div>
				
				<ul class="serverul">
					<li onclick="ckserver('1');" class="server1 job_extension_tck_yse"><a href="javascript:void(0)"><i class="job_extension_tck_icon "></i>自动刷新</a></li>
					
					<li onclick="ckserver('2');" class="server2"><a href="javascript:void(0)"><i class="job_extension_tck_icon "></i>职位置顶</a></li>
					
					<li onclick="ckserver('3');" class="server3"><a href="javascript:void(0)"><i class="job_extension_tck_icon "></i>推荐职位</a></li>
					
					<li onclick="ckserver('4');" class="server4"><a href="javascript:void(0)"><i class="job_extension_tck_icon "></i>紧急招聘</a></li>

					<li onclick="ckserver('5');" class="server5"><a href="javascript:void(0)"><i class="job_extension_tck_icon "></i>悬赏招聘</a></li>
				</ul>

				<input id="server" value='1' type="hidden" />
				<input id="jobid" value='' type="hidden" />
				
				<div class="job_extension_tck_bth">
					<a href="javascript:void(0)" onclick="forserver()" class="job_extension_tck_sub">确定</a>
				</div>

			</div> 
		</div> 
	</div>
</div> 
<script> 
function showserver(id){
	$('#jobid').val(id);
	$('#jobserver').show();
}
function ckserver(type){
	$("#server").val(type);
	$(".serverul li").removeClass("job_extension_tck_yse");
	$(".server"+type).addClass("job_extension_tck_yse");
}
function forserver(){
	var server=$("#server").val();
	var jobid=$("#jobid").val();
	if(server=='5'){
		window.location.href="index.php?c=addreward&jobid="+jobid;
		
	}else{
		window.location.href="index.php?c=getserver&id="+jobid+"&server="+server;
	}
	
}

function refreshJobWap(jobId){
	var weburl = '{yun:}url m=wap{/yun}';
	var integral = '{yun:}$config.integral_jobefresh{/yun}';
	var ajaxUrl = weburl+"member/index.php?c=ajax_refresh_job";

	$.post(ajaxUrl, {jobid:jobId},function(data){
		data = eval('(' + data + ')');
		
		if(data.error == 1){
			layermsg(data.msg, 2,9,function(){
				window.location.href='';
			});
		}else if(data.error == 2){
			layer.open({
				content: "您的等级特权已用完，继续操作将消费"+integral+"元，是否继续？",
				btn: ['继续', '取消'],
				shadeClose: false,
				yes: function () {
					window.location.href="index.php?c=getserver&id="+jobId+"&server="+5;;
				}
			});
		}else{
			layermsg(data.msg, 2,8);
		}
		 
	});
}
</script>
{yun:}include file="$wapstyle/footer.htm"{/yun} 